Towards a Lock-based Semantics for Java STM

نویسندگان

  • Vijay Menon
  • Steven Balensiefer
  • Tatiana Shpeisman
  • Ali-Reza Adl-Tabatabai
  • Richard L. Hudson
  • Bratin Saha
  • Adam Welc
چکیده

As memory transactions have been proposed as a language-level replacement for locks, there is growing consensus that software transactional memory (STM) implementations need to provide semantic guarantees at least as strong as locks. In this paper, we investigate the implications of lock-based semantics for transactions. We categorize safety properties imposed by these semantics into two sets: (1) those that maintain proper ordering and (2) those that prevent values from appearing out of thin air. As part of this, we define publication safety, the dual of privatization safety [16, 25, 23] and a property most existing STMs violate. For Java, we argue that an STM must respect all these properties to properly adhere to its memory model and maintain safety and security guarantees. Moreover, we also show that a weakly atomic, in-place update STM [3, 1] cannot provide these guarantees. For C++, we reason that only a subset of these properties need to be observed as the behavior of incorrectly synchronized programs can be left undefined. However, we show that violations of others can still lead to nonintuitive behavior in the presence of seemingly benign races and requires STM to impose surprising restrictions on what programmers and compilers are allow to do. Many in the community have proposed that a single global lock semantics [16, 7], where transaction semantics are mapped to those of regions protected by a single global lock, provide the most intuitive model for programmers. In this paper, we present a weakly atomic Java STM implementation that provides these semantics, obeys all the above safety properties, and permits concurrent execution. We also propose and implement two alternative semantics that loosen single lock requirements while still providing privatization safety, publication safety, and other properties. We compare our new implementations to previous ones, including a strongly atomic STM. [23]

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Supporting STM in Distributed Systems: Mechanisms and a Java Framework

We present HyFlow — a distributed software transactional memory (D-STM) framework for distributed concurrency control. Lockbased concurrency control suffers from drawbacks including deadlocks, livelocks, and scalability and composability challenges. These problems are exacerbated in distributed systems due to their distributed versions which are more complex to cope with (e.g., distributed dead...

متن کامل

Ordering-Based Semantics for Software Transactional Memory

It has been widely suggested that memory transactions should behave as if they acquired and released a single global lock. Unfortunately, this behavior can be expensive to achieve, particularly when— as in the natural publication/privatization idiom—the same data are accessed both transactionally and nontransactionally. To avoid overhead, we propose selective strict serializability (SSS) semant...

متن کامل

Third Workshop on Programmability Issues for Multi-Core Computers (MULTIPROG-3)

In this paper we present a complete Java STM framework, called Deuce, intended as a platform for developing scalable concurrent applications and as a research tool for designing new STM algorithms. It was not clear if one could build an e cient Java STM without compiler support. Deuce provides several bene ts over existing Java STM frameworks: it avoids any changes or additions to the JVM, it d...

متن کامل

Noninvasive concurrency with Java STM

In this paper we present a complete, compiler independent, Java STM framework called Deuce, intended as a development platform for scalable concurrent applications and as a research tool for designing STM algorithms. Deuce provides several benefits over existing Java STM frameworks: it avoids any changes or additions to the JVM, it does not require language extensions or intrusive APIs, and it ...

متن کامل

Fast Multi-Level Locks for Java A Preliminary Performance Evaluation

Atomic sections guarantee atomic and isolated execution of a block of code. Transactional Memory can be used to implement them but suffers from the inability to support system calls and has high overhead. Lock inference is a pessimistic alternative that infers the locks necessary to prevent thread interference. Our research looks at lock inference techniques for Java programs. An important aspe...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2007